package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Description: 点检任务转单历史
 * @Author: wxy
 * @Date:   2021-09-23
 * @Version: V1.0
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_CHECK_TASK_TRANSFER")
@Schema(description="点检任务转单历史")
public class EquipmentCheckTaskTransfer extends BaseEntity {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@Id
	@Generator
	@Column(name = "ID_", updatable = false)
	@Schema(description = "ID")
	private String id;
	/**任务id*/
	@Column(name = "TASK_ID_")
	@Schema(description = "任务id")
	private String taskId;
	/**转单类型*/

	@Dict(dicCode = "ERP_EQUIPMENT_TASK_TRANSFER_TYPE")
	@Column(name = "TYPE_")
	@Schema(description = "转单类型")
	private String type;
	/**原执行者*/
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
	@Column(name = "OLD_EXECUTOR_")
	@Schema(description = "原执行者")
	private String oldExecutor;
	/**现执行者*/
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
	@Column(name = "NEW_EXECUTOR_")
	@Schema(description = "现执行者")
	private String newExecutor;
	/**变更原因*/
	@Column(name = "REASON_")
	@Schema(description = "变更原因")
	private String reason;


}
